@extends('layouts.normal')
@section('self-style')
    <link rel="stylesheet" href="/package/plugins/daterangepicker/daterangepicker-bs3.css">
@endsection
@section('local-style')
    <style type="text/css">
        input[type="radio"] {margin-left: 20px;margin-right: 10px;}
        .form-group .radio-group {line-height: 34px;}
        .form-group .radio-group label {margin-bottom: 0px;}
    </style>
    <script type="text/javascript">
        var id = {!! $id !!};
    </script>
@endsection
@section('menu')
    @include("manager.layouts.menu")
@endsection

@section("header")
    <section class="content-header">
        <h4>
            项目管理
            <b>/</b>
            编辑项目
        </h4>
    </section>
@endsection

@section('content')
    <section class="content">
        <div class="row">
            <div class="col-md-12">
                <!-- Horizontal Form -->
                <div class="box box-success">
                    <div class="form-horizontal">
                        <div class="box-header with-border">
                            <div class="col-sm-12">
                                <h3 class="col-sm-2 box-title"></h3>
                                <div class="col-sm-9">
                                    <a class="btn btn-default pull-right" href="javascript:history.back();">返回</a>
                                </div>
                            </div>
                        </div>
                        <!-- /.box-header -->
                        <!-- form start -->
                        <div class="box-body">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">项目名称:</label>
                                <input type="hidden" class="program-id" value="{!! $id !!}">
                                <div class="col-sm-8">
                                    <input type="text" class="form-control  program-title">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label"> 项目起止时间:</label>
                                <div class="col-sm-8 program-start-end">
                                    @include('layouts.start-end-time')
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">申请起止时间:</label>
                                <div class="col-sm-8 apply-start-end">
                                    @include('layouts.start-end-time')
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">审核起止时间:</label>
                                <div class="col-sm-8 check-start-end">
                                    @include('layouts.start-end-time')
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-3 control-label">项目介绍（选填）:</label>

                                <div class="col-sm-8">
                                    <textarea class="form-control program-desc" cols="30" rows="10"></textarea>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">状态</label>

                                <div class="col-sm-8">
                                    <div class="col-sm-8 radio-group">
                                        <label><input type="radio" name="program-state" value="1" />开放</label>
                                        <label><input type="radio" name="program-state" value="0" />未开放</label>
                                    </div>
                                    <input type="hidden" class="form-control program-status" value="1">
                                </div>
                            </div>
                        </div>
                        <!-- /.box-body -->
                        <div class="box-footer">
                            <div class="form-group">
                                <label for="inputPassword3" class="col-sm-3 control-label"></label>

                                <div class="col-sm-8">
                                    <button class="btn btn-info pull-left btn-save">提交</button>
                                </div>
                            </div>

                        </div>
                        <!-- /.box-footer -->
                    </div>
                </div>
                <!-- /.box -->
            </div>
        </div>
    </section>
@endsection

@section('modal')

@endsection



@section('self-script')
    <script src="/package/plugins/daterangepicker/moment.min.js"></script>
    <script src="/package/plugins/daterangepicker/daterangepicker.js"></script>
    <script type="text/javascript" src="/js/manager/program-edit.js?v={{ time() }}"></script>
@endsection
@section('local-script')
    <script type="text/javascript">
        $('.program-start-end .start-end-time, .apply-start-end .start-end-time, .check-start-end .start-end-time').daterangepicker({
            "locale" : {
                "separator": " -222 ",
                "applyLabel": "确定",
                "cancelLabel": "取消",
                "fromLabel": "起始时间",
                "toLabel": "结束时间",
                "customRangeLabel": "自定义",
                "weekLabel": "W",
                "daysOfWeek": ["日", "一", "二", "三", "四", "五", "六"],
                "monthNames": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
                "firstDay": 1
            },
            "timePicker" : true,
            "timePicker12Hour" : false,
            "timePickerIncrement" : 1,
            "format" : "YYYY-MM-DD HH:mm",
            "separator" : " ~ "
        });
    </script>
@endsection